<template>
  <div class="top col-xs-10">
    <div class="top-right">
      <p>{{identity}}</p>
      <p>{{username}}</p>
      <!-- <a class="top_right_choose">^</a> -->
      <button class="top_right_choose">
        <popup_password class="popup_password"></popup_password>
      </button>
      <button class="top_right_choose" @click="goback()">退出</button>
    </div>
    
    <div style="clear: both"></div>
  </div>
</template>

<script>
import popup_password from '@/components/popup/popup_password.vue';
export default {
  data(){
    return{
      identity:'管理员',
      username:'lan',
    }
  },
  components: {
    popup_password,
  },
  methods: {
    goback() {
      //   this.$router.replace({ path: 'login' }) //清除历史记录并返回登录页面
      //   const sessionStorageKeys = Object.keys(sessionStorage);
      // for (let i = 0; i < sessionStorageKeys.length; i++) {
      //   const key = sessionStorageKeys[i];
      //   sessionStorage.removeItem(key);
      // }
      window.location.replace('login')
      //   history.pushState(null, '', window.location.href.split('#')[0]);



    },
  }
}
</script>

<style>
.top {
  height: 10vh;
  background-color: #006eff;
}

.top-right {
  margin-top: 2.5vh;
  display: flex;
  justify-content: flex-end;
  margin-right: 30px;
}

.top_right_choose {
  /* transform: rotate(180deg);
  display: inline;
  font-family: AdobeHeitiStd-Regular; */
  /* font-weight: normal;
  font-stretch: normal;
  letter-spacing: 0px;
  color: #ffffff; */
  font-size: 3vh;
  margin-left: 15px;
  background: none;
  color: inherit;
  border: none;
  color: white;
}

.top p {
  display: inline;
  height: 1.5vw;
  font-family: AdobeHeitiStd-Regular;
  font-size: 3vh;
  font-weight: normal;
  font-stretch: normal;
  letter-spacing: 0px;
  color: #ffffff;
  margin-left: 15px;
}
</style>